package com.itsenpupulai.bdtest.bean;

import com.itsenpupulai.bdtest.utils.DBUtil;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Generated;

/**
 * Created by Administrator on 2017/5/9.
 */
@Entity
public class User {
    @Id
    private long id;

    @Property
    private String longitude;
    private String latitude;
    private String address;
    private String addressStr;
    private String date;
    private String type;

    @Generated(hash = 1973889501)
    public User(long id, String longitude, String latitude, String address,
            String addressStr, String date, String type) {
        this.id = id;
        this.longitude = longitude;
        this.latitude = latitude;
        this.address = address;
        this.addressStr = addressStr;
        this.date = date;
        this.type = type;
    }
    @Generated(hash = 586692638)
    public User() {
    }
    public long getId() {
        return this.id;
    }
    public String getLongitude() {
        return this.longitude;
    }
    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }
    public String getLatitude() {
        return this.latitude;
    }
    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }
    public String getAddress() {
        return this.address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public String getAddressStr() {
        return this.addressStr;
    }
    public void setAddressStr(String addressStr) {
        this.addressStr = addressStr;
    }
    public void setId(long id) {
        this.id = id;
    }
    public String getDate() {
        return this.date;
    }
    public void setDate(String date) {
        this.date = date;
    }
    public String getType() {
        return this.type;
    }
    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return
                "  时间: " + DBUtil.dateFormat(id) + '\n' +
                "  经纬度: " + longitude  +
                " , " + latitude + '\n' +
                "  地点: " + addressStr + '\n' +
                "  定位时间: " + date + '\n' +
                "  定位类型: " + type + '\''
                ;
    }
}
